//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------
/*
	parameters priority:
		- dock, size (width or height), measure, margin
		or
		- align, size, margin, measure, measureAlign
		or
		- measure, measureAlign, pos, size
*/

#pragma once

namespace Engine
{
namespace UI
{


	//
	// Widget Layout
	//

	struct WidgetLayout
	{
	// variables
	public:
		vec2				pos;			// relative position
		vec2				size;			// size without resolution correction
		rect				margin;
		EDock::type			dock;
		EAlign::type		align;
		EAlign::type		measureAlign;	// align for absolute coords and proportional relative coords
		EMeasure::type		measure;
		bool				enabled;

		//EAnimation::type	onShowAnim;
		//EAnimation::type	onHideAnim;
		//float				animTime;

		//bool				scissor;

	// methods
	public:
		WidgetLayout () :
			dock(EDock::NONE), measureAlign(EAlign::DEFAULT), align(EAlign::NONE),
			//onShowAnim(EAnimation::NONE), onHideAnim(EAnimation::NONE),
			//animTime(0.0f), 
			measure(EMeasure::AUTO), enabled(false)
		{}
	};

}	// UI
}	// Engine